import pygame, sys
from pygame.locals import *
from Menu import *

pygame.init()

screen = pygame.display.set_mode((600,600))
pygame.display.set_caption('Testa Menu')

dirs = 0
score = 0
clock = pygame.time.Clock()

while True:
    clock.tick(10)
    for e in pygame.event.get():   # para a cobra se mexer
        if e.type == QUIT:
            sys.exit(0)
        elif e.type == KEYDOWN:     # dirs eh uma variavel que orienta o movimento da cobra, coerentemente
            if e.key == K_UP and dirs != 0:   # dirs representa numericamente a direcao do movimento da cobra
                dirs = 2
            elif e.key == K_DOWN and dirs != 2:
                dirs = 0
            elif e.key == K_LEFT and dirs != 1:
                dirs = 3
            elif e.key == K_RIGHT and dirs != 3:
                dirs = 1

    screen.fill((255, 255, 255))

    pygame.display.update()
